home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Interfaces / Universal Interfaces 2.0a3 / Universal AIncludes / Dictionary.a < prev    next >
Encoding:
Text File  |  1994-11-11  |  3.2 KB  |  160 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Dictionary.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.  
  17.     IF &TYPE('__DICTIONARY__') = 'UNDEFINED' THEN
  18. __DICTIONARY__ SET 1
  19.  
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24. ;        include 'ConditionalMacros.a'                                ;
  25.  
  26.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  27.     include 'Files.a'
  28.     ENDIF
  29. ;        include 'MixedMode.a'                                        ;
  30. ;        include 'OSUtils.a'                                        ;
  31. ;            include 'Memory.a'                                        ;
  32.  
  33. ; Dictionary data insertion modes 
  34. kInsert                            EQU        0                    ; Only insert the input entry if there is nothing in the dictionary that matches the key. 
  35. kReplace                        EQU        1                    ; Only replace the entries which match the key with the input entry. 
  36. kInsertOrReplace                EQU        2                    ; Insert the entry if there is nothing in the dictionary which matches the key. 
  37. ;                           If there is already matched entries, replace the existing matched entries with the input entry. 
  38.  
  39. ; This Was InsertMode 
  40. ; Key attribute constants 
  41. kIsCaseSensitive                EQU        $10                    ; case sensitive = 16        
  42. kIsNotDiacriticalSensitive        EQU        $20                    ; diac not sensitive = 32    
  43.  
  44. ; Registered attribute type constants.    
  45. kNoun                            EQU        -1
  46. kVerb                            EQU        -2
  47. kAdjective                        EQU        -3
  48. kAdverb                            EQU        -4
  49.  
  50. ; This Was AttributeType 
  51. ; Dictionary information record 
  52. DictionaryInformation     RECORD    0
  53. dictionaryFSSpec         ds        FSSpec
  54. numberOfRecords             ds.l    1
  55. currentGarbageSize         ds.l    1
  56. script                     ds.w    1
  57. maximumKeyLength         ds.w    1
  58. keyAttributes             ds.b    1
  59. filler                     ds.b    1
  60. sizeof                     EQU    84
  61.                         ENDR
  62.  
  63. DictionaryAttributeTable RECORD    0
  64. datSize                     ds.b    1
  65. datTable                 ds.b    1
  66. sizeof                     EQU    2
  67.                         ENDR
  68.  
  69.     IF GENERATING68K THEN
  70.         Macro
  71.         _InitializeDictionary
  72.             move.w    #$0500,d0
  73.             dc.w     $AA53
  74.         EndM
  75.     ELSE
  76.         IMPORT    InitializeDictionary
  77.     ENDIF
  78.  
  79.     IF GENERATING68K THEN
  80.         Macro
  81.         _OpenDictionary
  82.             move.w    #$0501,d0
  83.             dc.w     $AA53
  84.         EndM
  85.     ELSE
  86.         IMPORT    OpenDictionary
  87.     ENDIF
  88.  
  89.     IF GENERATING68K THEN
  90.         Macro
  91.         _CloseDictionary
  92.             move.w    #$0202,d0
  93.             dc.w     $AA53
  94.         EndM
  95.     ELSE
  96.         IMPORT    CloseDictionary
  97.     ENDIF
  98.  
  99.     IF GENERATING68K THEN
  100.         Macro
  101.         _InsertRecordToDictionary
  102.             move.w    #$0703,d0
  103.             dc.w     $AA53
  104.         EndM
  105.     ELSE
  106.         IMPORT    InsertRecordToDictionary
  107.     ENDIF
  108.  
  109.     IF GENERATING68K THEN
  110.         Macro
  111.         _DeleteRecordFromDictionary
  112.             move.w    #$0404,d0
  113.             dc.w     $AA53
  114.         EndM
  115.     ELSE
  116.         IMPORT    DeleteRecordFromDictionary
  117.     ENDIF
  118.  
  119.     IF GENERATING68K THEN
  120.         Macro
  121.         _FindRecordInDictionary
  122.             move.w    #$0805,d0
  123.             dc.w     $AA53
  124.         EndM
  125.     ELSE
  126.         IMPORT    FindRecordInDictionary
  127.     ENDIF
  128.  
  129.     IF GENERATING68K THEN
  130.         Macro
  131.         _FindRecordByIndexInDictionary
  132.             move.w    #$0A06,d0
  133.             dc.w     $AA53
  134.         EndM
  135.     ELSE
  136.         IMPORT    FindRecordByIndexInDictionary
  137.     ENDIF
  138.  
  139.     IF GENERATING68K THEN
  140.         Macro
  141.         _GetDictionaryInformation
  142.             move.w    #$0407,d0
  143.             dc.w     $AA53
  144.         EndM
  145.     ELSE
  146.         IMPORT    GetDictionaryInformation
  147.     ENDIF
  148.  
  149.     IF GENERATING68K THEN
  150.         Macro
  151.         _CompactDictionary
  152.             move.w    #$0208,d0
  153.             dc.w     $AA53
  154.         EndM
  155.     ELSE
  156.         IMPORT    CompactDictionary
  157.     ENDIF
  158.  
  159.     ENDIF ; __DICTIONARY__
  160.